const request = require('@ting-cli-dev/request')

module.exports = async function () {
    const res =  await request({
        url: '/project/template'
    })
    if (res.data && res.data.length) {
        return res.data
    }
    throw new Error('项目模板不存在')
}